<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
	<meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
	<meta name="HandheldFriendly" content="true"/>
	<meta name="MobileOptimized" content="320"/>
    <title>安装配置</title>
    <link rel="stylesheet" href="../css/jquery.mobile-1.4.5.min.css">
    <!--<link rel="stylesheet" type="text/css" href="../css/custom.css?20150514">-->
    <link rel="stylesheet" type="text/css" href="../css/custom.css">
    <!--script src="https://leancloud.cn/scripts/lib/av-0.5.0.min.js"></script-->
    <script type="text/javascript" src="../js/common.js"></script>
    <script>
      window.isOnline = /easylink.io/.test(window.location.href);
      var scripts = [];

	    scripts.push("../script/jquery.min.js");
	    scripts.push("../script/jquery.mobile-1.4.5.min.js");
	    scripts.push("../script/Base64.js");
	    scripts.push("../script/submit_modle.js");
	    scripts.push("../script/submit_action.js");
		  

      function load_js (scripts) {
        var scriptsEle = [];
        var h = document.getElementsByTagName('head')[0];
        scripts.forEach(function (val, index) {
          var js = document.createElement('script');
          js.type = "text/javascript";
          h.appendChild(js);
          scriptsEle[index] = js;
          if(index > 0) {
            scriptsEle[index-1].onload = function () {
              js.src = val;
            }
          }
        });
        scriptsEle[0].src = scripts[0];
      }

      load_js(scripts);
	function closeConfig(){
		alert("ok");
		window.opener=null;
		window.open('','_self');
		window.close();
	}
	
var ws=null,wo=null;
var domready=false;
window.back=function(hide){
	if(window.plus){
		ws||(ws=plus.webview.currentWebview());
//		ws.hide('auto');
//		return;
//		if(hide||ws.preate){
//			ws.hide('auto');
//		}else{
		ws.close('auto');
//		}
	}else if(history.length>1){
		history.back();
	}else{
		window.close();
	}
};

// H5 plus事件处理
function plusReady(){
	if(ws||!window.plus||!domready){
		return;
	}
	// 获取窗口对象
	ws=plus.webview.currentWebview();
	wo=ws.opener();
	// 显示页面
    ws.show("pop-in");
}

if(window.plus){
	plusReady();
}else{
	document.addEventListener("plusready",plusReady,false);
}
// 监听DOMContentLoaded事件
document.addEventListener("DOMContentLoaded",function(){
	domready=true;
	plusReady();
},false);
	
    </script>
</head> 
<body>
  <!-- 配置第一页 屏幕外观 -->
  <div data-role="page" id="page-one" data-dom-cache="true">

    <div data-role="header" style="background: #43aa4f;color: #fff;">
      <a href="###" onclick="back();" style="background:none;border: none;box-shadow: none;padding: 0;">
        <img src="../res/btn_header_back.svg" style="margin: 0;width: 56px;height: 56px;" />
      </a>
      <h1 style="text-align: center;height: 34px;line-height: 34px;font-size: 16px;">屏幕外观</h1>
    </div>

    <div data-role="content" class="img_container">
      <img src="../css/images/ajax-loader.gif">
    </div>

    <!-- 外观参数表单 -->
    <div data-role="content" style="display: none">
      <ul class="ui-body ui-body-a ui-corner-all">
        <li class="ui-field-contain">
          <label for="width">显示屏宽</label>
          <input type="number" id="width" placeholder="显示屏宽" required>
        </li>
      </ul>

      <ul class="ui-body ui-body-a ui-corner-all">
        <li class="ui-field-contain">
          <label for="height">显示屏高</label>
          <input type="number" id="height" placeholder="显示屏高" required>
        </li>
      </ul>

      <ul class="ui-body ui-body-a ui-corner-all">
        <li class="ui-field-contain">
          <label for="fast_config">快捷配置</label>
          <select id="fast_config">
            <option value="P10">P10单色12接口单元板</option>
            <option value="P5">P3.75,P5双色08接口单元板</option>
            <option value="other">自定义配置</option>
          </select>
        </li>
      </ul>

      <!--<ul class="ui-body ui-body-a ui-corner-all" style="display: none">
        <li class="ui-field-contain">
          <fieldset data-role="controlgroup" data-type="horizontal">
            <legend>基色数</legend>
            <input type="radio" name="color_num" id="color_num_1" value="r">
            <label for="color_num_1">单色</label>
            <input type="radio" name="color_num" id="color_num_2" value="rg">
            <label for="color_num_2">双色</label>
            <input type="radio" name="color_num" id="color_num_3" value="rgb">
            <label for="color_num_3">三色</label>
          </fieldset>
        </li>
      </ul>-->

      <ul class="ui-body ui-body-a ui-corner-all">
        <li class="ui-field-contain">
          <label for="fast_frequency">扫点频率</label>
          <select id="fast_frequency" data-native-menu="true">
            <option value="fastest">最快</option>
            <option value="faster">稍快</option>
            <option value="fast">快</option>
            <option value="normal" selected="selected">正常</option>
            <option value="slow">慢</option>
            <option value="slower">稍慢</option>
            <option value="slowest">最慢</option>
          </select>
        </li>
        <li class="ui-field-contain">
          <label for="fast_line_blanking">行消隐</label>
          <select id="fast_line_blanking" data-native-menu="true">
            <option value="normal">正常</option>
            <option value="longer">加长</option>
            <option value="longest">超长</option>
          </select>
        </li>
      </ul>
    </div>

    <!-- 保存按钮 -->
    <div class="button_bottom" id="page_one_button">
      <button class="fast_button_save ui-btn ui-corner-none ui-shadow ui-btn-active" style="background: #43aa4f;">保存</button>
    </div>

</body>
</html>